SetActiveDataSource

The SetActiveDataSource Function is used to provide information about a data source to the Crystal Active Data database driver. For instance, if a report has been designed using the Crystal Active Data Driver this method can be used to provide an active data source for the report, such as a DAO, ADO, or RDO recordset or a CDO rowset. In this case, the object passed to the third parameter of this function replaces, at runtime, the field definition file used to create the report.

Visual Basic Syntax
Declare Function SetActiveDataSource Lib "p2smon.dll" (ByVal printJob as 
Integer, 
                             ByVal tableNum as Integer,
                             x as Object) As Long
Parameters

Parameter Description

printJob

Specifies the print job to which you want to add the active data source.

tableNum

The 0 based number of a table for which you want to pass the active data recordset or rowset.

x

Variant data passed to the database driver such as a DAO, ADO or RDO recordset or a CDO rowset.

Return Value

Returns 0 (False) if the call failed. Returns 1 (True) if the call succeeded the data source was passed.

Remarks

The SetActiveDataSource function is used in conjunction with the Crystal Report Print Engine (Crpe32.dll) in a Visual Basic application. If you are using Visual C++ see PESetNthTablePrivateInfo.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com